package com.winglinks.mqttclient;

import org.eclipse.paho.client.mqttv3.MqttException;

/**
 * @author wangzhong
 * @description: mqtt客户端工厂接口
 * @date 2024/1/24 16:39
 */
public interface MqttClientFactory {
    /**
     * 根据客户端id查询client
     * @param clientId
     * @return
     */
    MyMqttClient getClient(String clientId,String username,String password) throws MqttException;

    /**
     * 注册client
     * @param clientId
     * @param mqttClient
     */
    void register(String clientId,MyMqttClient mqttClient);

    public MyMqttClient connect(String clientID, String username, String password);
}
